package cn.itcast.nems.config;

import cn.itcast.nems.manager.msas.MsasManager;
import com.itcast.msas.sdk.base.auth.MsasAuth;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * author: yong.li
 * create: 2023-08-15 16:14:54
 **/
@Configuration
@ConfigurationProperties(prefix = "msas")
@Setter
@Getter
public class MsasConfig {
    private String serverUrl;
    private String clientId;
    private String clientKey;

    @Bean
    public MsasManager msasManager() {
        return new MsasManager(clientId, clientKey, serverUrl);
    }

}
